package com.myzl.coal.client.parse;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
import lombok.extern.slf4j.Slf4j;

/**
 * @ClassName WebSocketFrameHandler
 * @Author wzb
 * @Date 2023/2/3 9:47
 * @Description
 */
@Slf4j(topic = "admin-collect")
public class WebSocketFrameHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, TextWebSocketFrame msg) throws Exception {
      log.info("-----{}",msg.text());
      ctx.channel().writeAndFlush(new TextWebSocketFrame("sadfsafd"));
    }
}
